package com.mycode.prototype05;

import com.mycode.prototype05.deep.Attachment;
import com.mycode.prototype05.deep.WeeklyLog;

import java.io.IOException;

public class DeepBootstrap {

    public static void main(String[] args) {
        WeeklyLog log = new WeeklyLog();
        Attachment attachment = new Attachment();
        log.setAttachment(attachment);

        WeeklyLog newLog = null;
        try {
            newLog = log.deepClone();
        } catch (Exception e) {
            System.err.println("克隆失败");
        }
        System.out.println("周报是否相同？" + (log == newLog));
        System.out.println("附件是否相同？" + (log.getAttachment() == newLog.getAttachment()));
    }
}
